﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="viewjsprofile.aspx.cs"
    Inherits="Hired.viewjsprofile" MasterPageFile="Hired2Div.master" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="HeadPlaceHolder">
    <link media="screen" rel="stylesheet" href="css/colorbox.css" />
    <style type="text/css">
        .profile_left
        {
            float: left;
            width: 180px;
        }
        .profile_right
        {
            float: left;
            margin: auto;
        }
        .profile_watchinglist
        {
            float: left;
            width: 270px;
            height: 575px;
            background: url(images/watchinglist.png);
        }
        p.profile
        {
            margin-top: 10px;
            padding-right: 0px;
            padding-left: 0px;
        }
        .txtComment
        {
            overflow: hidden;
        }
        .heading
        {
            position: relative;
            padding-left: 5px;
            font-family: Impact;
            font-size: 120%;
            color: Silver;
            top: 1px;
            left: 0px;
        }
        .headingline
        {
            bottom: 0px;
        }
        .lvImages
        {
            margin-top: 10px;
            margin-left: 15px;
        }
        .galleryImg
        {
            width: 120px;
            height: 120px;
            margin-left: 5px;
            border: 1px solid #D8D4F7;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="LeftPlaceHolder">
    <asp:UpdatePanel ID="upPanel" runat="server">
        <ContentTemplate>
            <div class="profile_left">
                <br />
                <img alt="" src="images/ProfilePic.png" /><br />
                <br />
                <p class="profile">
                    <asp:ImageButton ID="btnWall" runat="server" ImageUrl="images/Wall.png" OnClick="btnWall_Click" />
                    <p class="profile">
                        <asp:ImageButton ID="btnInformation" runat="server" ImageUrl="images/jsInfo.png"
                            OnClick="btnInformation_Click" />
                        <p class="profile">
                            <asp:ImageButton ID="btnBuddyList" runat="server" ImageUrl="images/buddyList.png"
                                OnClick="btnBuddyList_Click" />
                            <p class="profile">
                                <asp:ImageButton ID="btnAddBuddy" runat="server" ImageUrl="images/addbuddy.png" OnClick="btnAddBuddy_Click" />
                                <asp:ConfirmButtonExtender ID="btnAddBuddy_ConfirmButtonExtender" runat="server"
                                    Enabled="True" TargetControlID="btnAddBuddy" DisplayModalPopupID="BuddyModalPopupExtender">
                                </asp:ConfirmButtonExtender>
                                <asp:ModalPopupExtender ID="BuddyModalPopupExtender" runat="server" TargetControlID="btnAddBuddy"
                                    DropShadow="True" PopupControlID="pnlBuddyPopUp" CancelControlID="btnAddBuddyCancel"
                                    OkControlID="btnAddBuddyConfirm" BackgroundCssClass="modalBackground">
                                </asp:ModalPopupExtender>
                                <p class="profile">
                                    <asp:ImageButton ID="btnImages" runat="server" ImageUrl="images/images.png" OnClick="btnImages_Click" />
                                </p>
                                <p class="profile">
                                    <asp:ImageButton ID="btnMessage" runat="server" ImageUrl="images/message.png" OnClick="btnMessage_Click" />
                                    <asp:ModalPopupExtender ID="btnMessage_ModalPopupExtender" runat="server" BackgroundCssClass="modalBackground"
                                        BehaviorID="MessageModalPopupExtender" CancelControlID="btnAddMessageCancel"
                                        DropShadow="True" DynamicServicePath="" Enabled="True" PopupControlID="pnlMessageModalPopUp"
                                        TargetControlID="btnMessage">
                                    </asp:ModalPopupExtender>
                                </p>
            </div>
            <div class="profile_right">
                <asp:Panel ID="pnlWall" runat="server">
                    <asp:Label ID="lblUsername" runat="server" Font-Bold="True" Font-Size="Large"></asp:Label>
                    <br />
                    <asp:TextBox ID="txtComment" runat="server" Height="40px" TextMode="MultiLine" Width="450px"
                        CssClass="txtComment"></asp:TextBox>
                    <!--<asp:TextBoxWatermarkExtender ID="txtComment_TextBoxWatermarkExtender" 
                runat="server" Enabled="True" TargetControlID="txtComment" 
                WatermarkCssClass="watermark" WatermarkText="Click here to write a comment..." />-->
                    <asp:Button ID="btnComment" runat="server" Text="Comment" OnClick="btnComment_Click" />
                    <br />
                    <asp:Panel ID="pnlContainer" runat="server">
                    </asp:Panel>
                </asp:Panel>
                <asp:Panel ID="pnlPersonalInformation" runat="server" Visible="False" Style="position: relative;">
                    <div class="heading">
                        Basic information<div class="headingline">
                        </div>
                    </div>
                    <div class="updateinfo">
                    </div>
                    <p>
                        <asp:Label ID="lblFirstName" runat="server">First Name:</asp:Label>
                        <asp:Label ID="lblFirstNameValue" runat="server"></asp:Label>
                        <br />
                        <br />
                        <asp:Label ID="lblLastName" runat="server">Last Name:</asp:Label>
                        <asp:Label ID="lblLastNameValue" runat="server"></asp:Label>
                        <br />
                        <br />
                        <asp:Label ID="lblGender" runat="server">Gender:</asp:Label>
                        <asp:Label ID="lblGenderValue" runat="server"></asp:Label>
                        <br />
                        <br />
                        <asp:Label ID="lblDateOfBirth" runat="server">Date of Birth:</asp:Label>
                        <asp:Label ID="lblDateOfBirthValue" runat="server"></asp:Label>
                        <br />
                        <br />
                        <asp:Label ID="lblNationality" runat="server">Nationality:</asp:Label>
                        <asp:Label ID="lblNationalityValue" runat="server"></asp:Label>
                        <br />
                        <br />
                        <asp:Label ID="lblCountryOfResidence" runat="server">Country Of Residence:</asp:Label>
                        <asp:Label ID="lblCountryOfResidenceValue" runat="server"></asp:Label>
                        <br />
                        <br />
                        <asp:Label ID="lblWebsite" runat="server">Personal Website:</asp:Label>
                        <asp:Label ID="lblWebsiteValue" runat="server"></asp:Label>
                    </p>
                    <div class="heading">
                        Contact information<div class="headingline">
                        </div>
                    </div>
                    <p>
                        <asp:Label ID="lblEmail" runat="server">E-mail:</asp:Label>
                        <asp:Label ID="lblEmailValue" runat="server"></asp:Label>
                        <br />
                        <br />
                        <asp:Label ID="lblHomeNumber" runat="server">Home Number:</asp:Label>
                        <asp:Label ID="lblHomeNumberValue" runat="server"></asp:Label>
                        <asp:Label ID="lblMobileNumber" runat="server">Mobile Number:</asp:Label>
                        <asp:Label ID="lblMobileNumberValue" runat="server"></asp:Label>
                        <br />
                        <br />
                        <div class="heading">
                            Work/education information<div class="headingline">
                            </div>
                        </div>
                        <p>
                            <asp:Label ID="lblEducationLevel" runat="server">Education Level:</asp:Label>
                            <asp:Label ID="lblEducationLevelValue" runat="server"></asp:Label>
                            <br />
                            <br />
                            <asp:Label ID="lblPreviousEducationalInstitute" runat="server">Previous Educational Institute:</asp:Label>
                            <asp:Label ID="lblPreviousEducationalInstituteValue" runat="server"></asp:Label>
                            <asp:Label ID="lblSpecialization" runat="server">Specialization</asp:Label>
                            <asp:Label ID="lblSpecializationValue" runat="server"></asp:Label>
                            <br />
                            <br />
                            <asp:Label ID="lblPreviousEmployment" runat="server">Previous Employment:</asp:Label>
                            <asp:Label ID="lblPreviousEmploymentValue" runat="server"></asp:Label>
                            <asp:Label ID="lblCurrentEmployment" runat="server">Current Employment:</asp:Label>
                            <asp:Label ID="lblCurrentEmploymentValue" runat="server"></asp:Label>
                        </p>
                </asp:Panel>
                <asp:Panel ID="pnlBuddyList" runat="server" Visible="False">
                    <p>
                        &nbsp;<asp:ListView ID="lvBuddyList" runat="server" DataKeyNames="Username">
                            <EmptyDataTemplate>
                                <span>No data was returned.</span>
                            </EmptyDataTemplate>
                            <ItemTemplate>
                                <table width="560px">
                                    <tr>
                                        <td width="100px">
                                            <asp:Image ID="imgBuddyProfile" runat="server" ImageUrl='<%# Eval("ImageAddress") %>' />
                                        </td>
                                        <td>
                                            <asp:LinkButton ID="lblBuddyName" runat="server" Text='<%# Eval("Name") %>' PostBackUrl='<%# "viewprofile.aspx?username=" + Eval("Username") %>' />
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                            <LayoutTemplate>
                                <div id="itemPlaceholderContainer" runat="server" style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                                    <span runat="server" id="itemPlaceholder" />
                                </div>
                                <div style="text-align: center; background-color: #FFCC66; font-family: Verdana, Arial, Helvetica, sans-serif;
                                    color: #333333;">
                                    <asp:DataPager ID="DataPager1" runat="server">
                                        <Fields>
                                            <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowLastPageButton="True" />
                                        </Fields>
                                    </asp:DataPager>
                                </div>
                            </LayoutTemplate>
                        </asp:ListView>
                </asp:Panel>
                <asp:Panel ID="pnlImages" runat="server" Visible="False">
                    <div class="heading">
                        Your images<div class="headingline">
                        </div>
                    </div>
                    <div class="lvImages">
                        <asp:ListView ID="lvImages" runat="server" DataSourceID="eds" DataKeyNames="ImageAddress">
                            <ItemTemplate>
                                <asp:Image ID="imgThumbnail" runat="server" Width="120px" Height="120px" ImageUrl='<%# Eval("ImageAddress") %>'
                                    CssClass="imgThumbnail" />
                                <asp:ModalPopupExtender ID="ModalPopupExtenderImage" runat="server" CancelControlID="btnExit"
                                    PopupControlID="pnlImgPopup" TargetControlID="imgThumbnail" BackgroundCssClass="modalBackground" />
                                <asp:Panel ID="pnlImgPopup" runat="server" CssClass="modalPopup">
                                    <asp:Image ID="imgPopup" runat="server" ImageUrl='<%# Eval("ImageAddress") %>' />
                                    <br />
                                    <br />
                                    <asp:ImageButton ID="btnExit" runat="server" Text="Exit" ImageUrl="images/closelabel.gif"
                                        Style="float: right;" />
                                    <br />
                                </asp:Panel>
                            </ItemTemplate>
                            <LayoutTemplate>
                                <table>
                                    <tr>
                                        <td runat="server" id="itemPlaceHolder">
                                        </td>
                                    </tr>
                                </table>
                                <asp:DataPager ID="DataPagerImages" runat="server" PagedControlID="lvImages" PageSize="1"
                                    style="float: right; margin: 15px 5px 5px auto;">
                                    <Fields>
                                        <asp:NextPreviousPagerField NextPageText="" />
                                        <asp:NumericPagerField NextPageText="" PreviousPageText="" />
                                        <asp:NextPreviousPagerField NextPageText="Next..." PreviousPageText="" />
                                    </Fields>
                                </asp:DataPager>
                            </LayoutTemplate>
                        </asp:ListView>
                        <asp:EntityDataSource ID="eds" runat="server" ConnectionString="name=hireddbEntities"
                            DefaultContainerName="hireddbEntities" EnableFlattening="False" EntitySetName="ImageRosters"
                            Where="it.UserID == @id">
                            <WhereParameters>
                                <asp:ControlParameter ControlID="lvImages" DbType="String" DefaultValue="" Name="id"
                                    PropertyName="SelectedValue" />
                            </WhereParameters>
                        </asp:EntityDataSource>
                    </div>
                </asp:Panel>
                <asp:Panel ID="pnlBuddyPopUp" runat="server" CssClass="modalPopup">
                    <strong>Add as Buddy</strong><br />
                    Do you wish to add
                    <asp:Label ID="lblBuddyUsername" runat="server"></asp:Label>
                    as a buddy?
                    <br />
                    <br />
                    <asp:Button ID="btnAddBuddyCancel" Style="float: right" runat="server" Text="Cancel" />
                    <asp:Button ID="btnAddBuddyConfirm" Style="float: right; margin-right: 25px;" runat="server"
                        Text="OK" />
                    <asp:Button ID="btnPopup" runat="server" Style="display: none;" />
                    <br />
                </asp:Panel>
                <asp:Panel ID="pnlConfirmBuddyPopUp" runat="server" CssClass="modalPopup">
                    <asp:Label ID="lblConfirmBuddyUsername" runat="server" />.
                    <br />
                    <br />
                    <div style="width: 100%; text-align: center;">
                        <asp:Button ID="btnConfirmExit" Style="margin: 0 auto;" runat="server" Text="OK" />
                    </div>
                    <br />
                </asp:Panel>
                <asp:ModalPopupExtender ID="ModalPopupBuddyConfirm" runat="server" TargetControlID="btnPopup"
                    DropShadow="True" PopupControlID="pnlConfirmBuddyPopUp" CancelControlID="btnConfirmExit"
                    BackgroundCssClass="modalBackground" />
                <asp:Panel ID="pnlMessageModalPopUp" runat="server" CssClass="modalPopup">
                    <table class="style1">
                        <tr>
                            <td style="text-align: right">
                                To:
                            </td>
                            <td>
                                <asp:Label ID="lblRecipient" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right">
                                Subject:
                            </td>
                            <td>
                                <asp:TextBox ID="txtSubject" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right">
                                Content:
                            </td>
                            <td>
                                <asp:TextBox ID="txtContent" runat="server" Height="197px" TextMode="MultiLine" Width="315px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="text-align: center;">
                                <asp:Button ID="btnAddMessageConfirm" runat="server" Text="Send" OnClick="btnSend_Click"
                                    Style="margin-right: 10px;" />
                                <asp:Button ID="btnAddMessageCancel" runat="server" Text="Cancel" Style="margin-left: 10px;" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="RightPlaceHolder">
</asp:Content>
